package uns.fit.gis.mapobj;

public class SimpleLocation {
	private int info;
	//private String name;
	private byte[] name;
	//private Point drawingPoint;
	//private Point point;
	private int point;
	
	public SimpleLocation()
	{
		//name = new byte[0];
	}

	public int getId() {
		return (info >> 16) & 0xFFFF;
	}

	public void setId(int id) {
		info = ((id & 0xFFFF) << 16) | (info & 0xFFFF);
	}
	/*
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	*/
	/*
	public Point getDrawingPoint() {
		return drawingPoint;
	}

	public void setDrawingPoint(Point drawingPoint) {
		this.drawingPoint = drawingPoint;
	}

	public Point getPoint() {
		return point;
	}

	public void setPoint(Point point) {
		this.point = point;
	}
	*/
	public int getType() {
		return (info >> 8) & 0xFF;
	}

	public void setType(int type) {
		info = ((type & 0xFF) << 8) | (info & 0xFFFF00FF);
	}

	public int getOther() {
        return info & 0xFF;
    }

    public void setOther(int other) {
        info = (other & 0xFF) | (info & 0xFFFFFF00);
    }

	public byte[] getName() {
		return name;
	}

	public void setName(byte[] name) {
		this.name = name;
	}

	public void setX(int x) {
        point = ((x & 0xFFFF) << 16) | (point & 0xFFFF);
    }

    public int getX() {
        return ((point >> 16) & 0xFFFF);
    }

    public void setY(int y) {
        point = (point & 0xFFFF0000) | (y & 0xFFFF);
    }

    public int getY() {
        return (point & 0xFFFF);
    }
}
